﻿using System;
using System.Windows.Forms;

namespace GMC_4
{
    static class ControlInvoker
    {
        public static void Invoke<T>(this T control, Action action) where T : Control
        {
            if (control.InvokeRequired)
                control.Invoke(action);
            else
                action();
        }
    }
}
